Synchronisation and trigger distribution across instrumentation networks

ABSTRACT

A system for synchronising the operation of a measurement instrument having a microcontroller, a local oscillator and function circuitry to an external timebase is provided. The system includes a USB Host Controller; an interrupt generator adapted to respond to ITPs by generating respective interrupts and passing the interrupts to the microcontroller; and a timer for measuring an interval between receptions of the ITPs in a time domain of the local oscillator.

RELATED APPLICATION

This application is a continuation of U.S. application Ser. No.13/320,388 filed Nov. 14, 2011, which is a National Phase of ApplicationNo. PCT/AU2010/000608 filed May 20, 2010, which is based on and claimsthe benefit of the filing date of U.S. Application No. 61/179,904 filedMay 20, 2009, the content of which as filed is incorporated herein byreference in its entirety.

FIELD OF THE INVENTION

The present invention relates to a method and apparatus for providing asynchronization and timing system, with connectivity based on revisionthree of the Universal Serial Bus (USB) architecture (or USB 3.0), ofparticular but by no means exclusive use in providing clocks, dataacquisition and automation and control of test and measurementequipment, instrumentation interfaces and process control equipment,synchronized to an essentially arbitrary degree in either a localenvironment or in a distributed scheme.

BACKGROUND OF THE INVENTION

The USB specification up to and including revision 2.0 was intended tofacilitate the interoperation of devices from different vendors in anopen architecture. USB 2.0 data is encoded using differential signalling(viz. in which two wires transfer the information) in the form of thedifference between the signal levels of those two wires. The USB 2.0specification is intended as an enhancement to the PC architecture,spanning portable, desktop and home environments.

However, USB was user focussed so the USB 2.0 specification lacked amechanism for synchronising devices to any great precision. Severalproposals attempted to address this and other deficiencies. For example,U.S. Pat. No. 6,343,364 (Leydier et al.) discloses an example offrequency locking to USB traffic, which is directed toward a smart cardreader. This document teaches a local, free-running clock that iscompared to USB SYNC and packet ID streams; its period is updated tomatch this frequency, resulting in a local clock with a nominalfrequency of 1.5 MHz. This provides a degree of synchronizationsufficient to read smart card information into a host PC but, as thisapproach is directed to a smart card reader, inter-devicesynchronization is not addressed.

WO 2007/092997 (Foster et al.) discloses a synchronized USB device thatallows the generation of accurate clock frequencies on board the USBdevice regardless of the accuracy of the clock in the Host PC. The USBSOF packet is decoded by the USB device, and treated as a clock carriersignal instead of acting as a clock reference.

The carrier signal, once decoded from the USB traffic, is combined witha scaling factor to generate synchronization information and hence tosynthesize a local clock signal with precise control of the clockfrequency. In this way, the frequency of the local clock signal can bemore accurate than the somewhat ambiguous frequency of the carriersignal.

This arrangement is said to be able to produce a local clock signal toarbitrarily high frequencies, such as a clock frequency of tens ofmegahertz, and thus to ensure that the local clock of each deviceconnected to a given USB is synchronized in frequency. U.S. applicationSer. No. 10/620,769 also teaches a method and apparatus to furthersynchronize multiple local clocks in phase by measurement of signalpropagation time from the host to each device and provision of clockphase compensation on each of the USB devices.

U.S. patent application Ser. No. 12/279,328 (Foster et. al.) teachessynchronisation of the local clocks of a plurality of USB devices to atimebase received from another interface. In one embodiment, a USBdevice contains a local clock that is synchronised to an externallyprovided time signature across Ethernet using the IEEE-1588 protocol. Inyet another embodiment the USB device's clock is synchronised to atimebase derived from a Global Positioning System (GPS) synchronisedclock.

All of the above systems work within the bounds of conventional USB 2.0and as such are limited in several areas. USB 2.0 is limited in range bythe device response timeout. This is the window of time that the USBHost Controller allocates for receipt of a signal from a given USBdevice in response to a request from the USB Host Controller. Thephysical reach of USB 2.0 is therefore approximately 25 m.

The USB 3.0 specification was released in November 2008 and is alsofocussed on consumer applications. The USB 3.0 specification makessignificant changes to the architecture of USB. In particular, thebackground art synchronisation schemes discussed above will not workwith the new 5 Gb/s protocol (termed ‘SuperSpeed USB’) because it doesaway with the broadcast mechanism for SOF packets.

USB 3.0 defines two parallel and independent USB busses on the sameconnection cable. Firstly, the USB 2.0 bus remains unchanged (forbackward compatibility) and offers Low Speed (1.5 Mb/s), Full Speed (12Mb/s) and High Speed (480 Mb/s) protocols. The second bus—for 5 Gb/straffic—provides the SuperSpeed USB. These busses operate independently,except that operation of the busses to a given USB device is mutuallyexclusive. That is, if a SuperSpeed connection is possible, then the USB2.0 bus in disconnected to that device.

The dual-bus architecture of USB 3.0 is depicted schematically at 10 inFIG. 1. Personal Computer 12, containing USB Host Controller 14, isconnected to USB 3.0 Hub 16 by first USB 3.0-compliant cable 18; USB 3.0device 20 is connected to a downstream port 22 of USB 3.0 Hub 16 bysecond USB 3.0-compliant cable 24.

USB Host Controller 14 contains both a USB 2.0 Host 26 and a SuperSpeedHost 28. These two hosts 26, 28 are independent of one another, and eachhost 26, 28 is capable of connecting up to 127 devices (including hubs).USB 3.0-compliant cables are compound cables, containing a USB2.0-compliant cable and a series of shielded conductors capable oftransmitting SuperSpeed signals. Hence, USB 3.0-compliant cable 18comprises USB 2.0-compliant cable 30 and shielded conductors 32.

USB 3.0 Hub 16 contains both a USB 2.0 Hub function 34 and a SuperSpeedHub function 36, each connected directly to its respective Host 26, 28by compound cable 18. USB 3.0 device 20 contains both a USB 2.0 devicefunction 38 and a SuperSpeed device function 40, each connected back toits respective hub function 34, 36 of USB 3.0 Hub 16 by compound cable24.

At enumeration of USB 3.0 device 20, SuperSpeed Host 28 checks for thepresence of a SuperSpeed device function (40). If a SuperSpeed device isfound, then a connection is established. If a SuperSpeed device is notfound (as in the case where only a USB 2.0 device is connected to port22), then the USB 2.0 Host 26 checks for the presence of a USB 2.0device function (38) at device 20. Once the Host Controller 14determines which device function is connected, it tells the USB 3.0 Hub16 to only enable communication for downstream port 22 corresponding towhether the USB 2.0 device function 38 or SuperSpeed device function 40is attached. This means that only one of the two parallel busses is inoperation at any one time to an end device such as USB 3.0 device 20.

Furthermore, SuperSpeed USB has a different architecture from that ofthe USB 2.0 bus. Very high speed communication systems consume largeamounts of power owing to high bit rates. A design requirement ofSuperSpeed USB was lower power consumption, to extend the battery lifeof user devices. This has resulted in a change from the previousbroadcast design of the USB 2.0: SuperSpeed is not a broadcast bus, butrather directs communication packets to a specific node in the systemand shuts down communication on idle links.

This significantly affects any extension of the synchronisation schemesof, for example, U.S. patent application Ser. No. 12/279,328, whosemethod and apparatus for synchronising devices is based on a broadcastclock carrier signal that is delivered to each device on the bus, whichis unsuitable in SuperSpeed USB.

A SuperSpeed Hub function acts as a device to the host (or upstreamport) and as a host to the device (or downstream port). This means thatthe SuperSpeed Hub function acts to buffer and schedule transactions onits downstream ports rather than merely acting as a repeater. Similarly,the SuperSpeed Hub function does so with scheduling transmissions on theupstream port. A heavily burdened Hub function can therefore addsignificant non-deterministic delays in packet transmission through thesystem. This also precludes the use of USB 2.0 synchronisation schemessuch as that of U.S. patent application Ser. No. 12/279,328 fromoperating on SuperSpeed USB.

The crude Isochronous synchronisation of USB 2.0 has been significantlyimproved in the USB 3.0 specification. Opening an Isochronouscommunication pipe between a Host Controller and a USB device guaranteesa fixed bandwidth allocation in each Service Interval for thecommunication pipe. The Isochronous Protocol of USB 3.0 contains aso-called Isochronous Timestamp Packet (ITP), which is sent at somewhatregular intervals to each Isochronous Endpoint and which contains atimestamp of the beginning of ITP transmission by the USB Host PhysicalLayer (Phy) in the time domain of the Host Controller. The IsochronousTimestamp Packet is accurate to about 25 ns. SuperSpeed USB shuts downidle links to conserve power, but links must be active in order toreceive an Isochronous Timestamp Packet. The Host Controller musttherefore guarantee that all links to a device are in full active mode(termed power state U0) before transmission of the Isochronous TimestampPacket.

Unfortunately the Isochronous Timestamp packet can be delayed inpropagation down the USB network. USB 3.0 also does not provide a way ofdetermining the propagation time of packets in SuperSpeed USB and henceno way of accurately knowing the phase relationship between time domainson different USB devices. Phase differences of several hundrednanoseconds are expected to be a best case scenario with SuperSpeed USBmaking it impractical for instrumentation or other precision timingrequirements.

U.S. Pat. No. 5,566,180 (Eidson et al.) discloses a method ofsynchronising clocks in which a series of devices on a communicationnetwork transmit their local time to each other and network propagationtime is determined by the ensemble of messages. Further disclosures byEidson (U.S. Pat. Nos. 6,278,710, 6,665,316, 6,741,952 and 7,251,199)extend this concept but merely work toward a synchronisation scheme inwhich a constant stream of synchronising messages are transferredbetween each of the nodes of a distributed instrument network viaEthernet. This continual messaging consumes bandwidth and limits theaccuracy of the possible synchronisation to several hundred nano-secondsin a point-to-point arrangement and substantially lower accuracy(typically micro-seconds) in a conventional switched subnet.

It should be understood that the terms ‘clock signals’ and‘synchronisation’ in this disclosure are used to refer to clock signals,trigger signals, delay compensation information and propagation timemeasurement messages. It should also be understood that a ‘notion oftime’ in this disclosure is used to denote an epoch or ‘real time’ andcan also be used to refer to the combination of a clock signal and anassociated epoch.

SUMMARY OF THE INVENTION

It is a general object of the present invention to enable precisionsynchronisation of a plurality USB devices, up to a predefined maximum,according to the USB3 Specification.

According to a first broad aspect, the present invention provides asystem for synchronising the operation of a measurement instrumenthaving a microcontroller, a local oscillator and function circuitry toan external timebase, the system comprising:

-   -   a USB Host Controller to which the local oscillator is        attachable;    -   an interrupt generator adapted to respond to receipt of one or        more Isochronous Timestamp Packets by generating respective        interrupts and passing the interrupts to the microcontroller;        and    -   a timer or counter adapted to measure an interval between        receptions of the Isochronous Timestamp Packets in a time domain        of the local oscillator (from which, if desired, information can        be derived about a frequency of the local oscillator with        respect to the timestamped Isochronous Timestamp Packets);    -   wherein the system is adapted to control the instrument to open        one or more Isochronous communication pipes or endpoints to the        USB Host Controller, to ensure that the instrument is in link        state U0 in preparation for receiving a plurality of Isochronous        Timestamp Packets (ITPs) and to control the USB Host Controller        to send a plurality of the Isochronous Timestamp Packets to the        Isochronous communication pipes or endpoints, the        microcontroller is configured to respond to each of the        plurality of interrupts (such as with an interrupt service        routine provided therein) by generating an output signal adapted        to be used as a synchronization reference signal, and the        instrument is configured to create a mapping between respective        local times of a plurality of operations or events of the        function circuitry of the instrument and a time domain of the        USB Host Controller.

In one embodiment, the system comprises the instrument. In a particularembodiment, the instrument is a SuperSpeed USB device. Thus, theoperation of, for example, a SuperSpeed USB device can be synchronised,as each of the operations (or events) can be mapped back to the timedomain of the USB Host Controller.

The microcontroller may be further configured to read respectivetimestamps from each of a selected pair of the Isochronous TimestampPackets, and calculate a period between the selected pair of theIsochronous Timestamp Packets from their respective timestamps (and,further, may optionally form a comparison between the interval betweenselected successive Isochronous Timestamp Packets as determined by thetimer or counter and the calculated period.

Thus, knowledge of the time domain of the USB Host Controller may beimproved

In one embodiment, the system is further adapted system to omit from thecomparison any of the Isochronous Timestamp Packets that contains aPacket_Delayed flag.

In one embodiment, the microcontroller is further configured to make aplurality of such readings, and to generate a time series ofdeterminations of the local clock period and timestamps.

The microcontroller or USB Host Controller may be adapted tostatistically analyze the time series and to improve synchronisationaccuracy therefrom.

Also according to this aspect there is provided a method ofsynchronising the operation of a measurement instrument to an externaltimebase, the method comprising:

-   -   the instrument, having a microcontroller and a local oscillator        attached to a USB Host Controller, opening one or more        Isochronous communication pipes or endpoints to the USB Host        Controller;    -   ensuring that the instrument is in link state U0 in preparation        for receiving a plurality of Isochronous Timestamp Packets        (ITP);    -   the USB Host Controller sending a plurality of Isochronous        Timestamp Packets to the Isochronous communication pipes or        endpoints;    -   the instrument receiving the plurality of Isochronous Timestamp

Packets and in response generating a respective plurality of interruptsand passing the interrupts to the microcontroller;

-   -   measuring a time interval between receptions of the Isochronous        Timestamp Packets in a time domain of the local oscillator (and        optionally deriving information about the frequency of the local        oscillator with respect to the timestamped Isochronous Timestamp        Packet therefrom); and    -   the instrument creating a mapping between respective local times        of a plurality of operations or events of function circuitry of        the instrument and a time domain of the USB Host Controller.

In one embodiment, the instrument is a SuperSpeed USB device.

The method may comprise the microcontroller responding to each of theinterrupts (such as with an interrupt service routine provided therein)by generating an output signal adapted to be used as a synchronizationreference signal for a plurality or all of the Isochronous TimestampPackets, and deriving information about the frequency of the localoscillator with respect to the timestamped Isochronous Timestamp Packettherefrom with a first counter/timer measuring the period of intervalbetween reception of successive the output signals.

In one embodiment, the method includes mapping each of the operations orevents back to the time domain of the USB Host Controller.

In one embodiment, the instrument includes instrumentation andmeasurement or data acquisition circuitry.

In one embodiment, the method further comprises:

-   -   reading respective timestamps from each of the plurality of        Isochronous Timestamp Packets; and    -   calculating a period between a selected successive pair of the        Isochronous Timestamp Packets from their respective timestamps.

The method may include forming a comparison between the interval betweenthe selected successive Isochronous Timestamp Packets as determined bythe timer or counter and the calculated period.

The method may include omitting any of the Isochronous Timestamp Packetsthat contain a Packet_Delayed flag from the comparison.

The method may comprise making a plurality of the readings andgenerating a time series of determinations of the local clock period andtimestamps.

The method may further comprise statistically analyzing the time seriesand improving synchronisation accuracy therefrom.

In a particular embodiment, the interrupts result in interrupt serviceroutines generated in response to the detection of an IsochronousTimestamp Packet by the SuperSpeed USB device.

In a particular embodiment, the interrupts are hardware interruptsgenerated in response to the detection of an Isochronous TimestampPacket by the SuperSpeed USB device.

In one embodiment, the method further comprises:

-   -   measuring signal propagation time from a selected point in a USB        network containing the SuperSpeed USB device to the SuperSpeed        USB device; and        -   adjusting the phase of the local oscillator;        -   whereby the local oscillator is synchronised to a desired            phase.

In an embodiment, the timer/counter uses only those of the IsochronousTimestamp Packets whose transmission was not delayed in a USB network.Furthermore statistical means may be used to improve the accuracy ofmeasurements and improve synchronisation. This may be by averaging themeasurements of the interval between reception of successive the outputsignals, or by performing a statistical analysis on the set of suchmeasurements of the time intervals.

In a particular embodiment, the method includes measuring the intervalbetween receptions of the synchonisation reference signals with acounter/timer function clocked from the local oscillator.

In an embodiment, the time interval used to measure the frequency of thelocal oscillator is an interval between receptions of successiveIsochronous Timestamp Packets. The accuracy of measurement of the localoscillator frequency may be increased by measurement over multiplesuccessive intervals and using statistical analysis.

In one embodiment, the microcontroller has timer/counter functionality.It will be readily understood by those skilled in the art that suchcounter/timer functionality can be deployed in logic devices external tothe microcontroller, for example Field Programmable Gate Arrays (FPGA)or Complex Programmable Logic Devices (CPLD) or a dedicatedcounter/timer circuit.

In one embodiment, the microcontroller has interrupt service routinecapability whereby the interrupt service routines can be called ortriggered in response to detection of the Isochronous Timestamp Packets.

The interrupts may be software interrupts, but in one embodiment, theinterrupts are hardware interrupts wherein there is minimal latency ingenerating the required output from an Interrupt Service Routine (ISR).

In one embodiment, the local oscillator is a free-running localoscillator, but it will be understood by those skilled in the art thatthe local oscillator may assume alternative forms and comprise, forexample, a Voltage Controlled Crystal Oscillator (VCXO), a TemperatureCompensated Crystal Oscillator (TCXO), an Oven Controlled CrystalOscillators (OCXO) or a multi-tap clock.

It will also be understood by those skilled in the art that thecounter/timer circuitry may not be clocked directly from the localoscillator but instead via a clock source divided or multiplied infrequency from the local oscillator.

The method of this aspect may be used to synchronise a plurality of USBdevices attached to a common USB host controller, whereby the operationsor functions of the USB devices are synchronised to an arbitrarilyprecise degree. Furthermore the method may include determining thepropagation time of the timestamped Isochronous Timestamp Packet fromthe USB Host Controller to the USB device according to any of suchmethod of the present invention described herein, depending on theparticular synchronisation channel employed in the respectiveembodiment.

It will be understood by those skilled in the art that measuring theperiod between receptions of successive carrier signals with respect tothe free-running local oscillator is equivalent to knowing the time ofthe plurality of receptions of Isochronous Timestamp Packets in the timedomain of the free-running oscillator. It will also be understood thatsuch a relative notion of time can be referenced to an absolute notionof time.

In one embodiment a SuperSpeed synchronisation channel is provided,adapted to determine the respective period of time between reception ofsuccessive Isochronous Timestamp Packets. However, this channel may bereplaced with a non-SuperSpeed synchronisation channel. Thenon-SuperSpeed synchronisation channel may be adapted to any one of themethods of synchronisation as disclosed in this invention. Thenon-SuperSpeed synchronisation channel may include a periodic timingsignal adapted for use as the reference timing signal instead of theIsochronous Timestamp Packet in the SuperSpeed synchronisation channel.

Furthermore, it is often desirable to know the absolute phaserelationship between the plurality of timebases, but one device may beclose to the Host Controller and another may be a long distance away.Since each of a plurality of instruments (such as SuperSpeed USBdevices) synchronised according to this method would be synchronised tothe reception of the plurality of Isochronous Timestamp Packets,absolute phase information is not automatically available.

Therefore if the instrument (such as a SuperSpeed USB device) is one ofa plurality of like devices, the method may also include an apparatusfor determining the relative propagation time of the multicastIsochronous Timestamp Packets from the USB Host Controller to each ofthe devices, such as by any of the methods for determining propagationtime of the present invention described herein. Furthermore each of thedevices may contain a mechanism adapted to adjust the phase of theirrespective local notions of time, resulting in a synchronised USB withknown absolute phase relationships between devices.

It will be understood by those skilled in the art that such ameasurement synchronisation method as described for a USB instrument isalso applicable to any measurement instrument that receives a pluralityof timestamped signals with which to determine the rate of its localclock and hence the timebase of the local measurement system, includingto permit synchronisation of a plurality of disparate networks (forexample but not limited to PXI, PXI-express, IEEE-1588 ethernet, PCI,VXI and USB).

According to this aspect, there is also provided an apparatus forsynchronising the operation of a measurement instrument having a localoscillator and function circuitry to an external timebase, the apparatuscomprising:

-   -   circuitry for decoding a plurality of time-stamped packets from        the communication bus;    -   circuitry for measuring a time interval between receptions of        the time-stamped packets in a time domain of the local        oscillator; and    -   a computing mechanism configured to create a mapping between        respective local times of a plurality of operations or events of        the function circuitry and a time domain of a communication bus        to which the instrument is attached.

The apparatus may comprise the instrument.

In one embodiment, the measurement instrument is a SuperSpeed USB deviceand the communication bus is a SuperSpeed USB.

In one embodiment, the instrument is an Ethernet-based device.

In an embodiment, the local oscillator is a free-running oscillator.

In a particular embodiment, the local oscillator is a voltage controlleroscillator (VCXO), a temperature compensated crystal oscillator (TCXO),an oven controlled crystal oscillator (OCXO) or some other clockcircuitry.

In a second broad aspect, the invention provides a method ofsynchronising the operation of a plurality of instruments each having amicrocontroller and a local oscillator attached to a common USB HostController, the method comprising:

-   -   for each respective instrument:    -   (a) the instrument opening one or more Isochronous communication        pipes or endpoints to the USB Host Controller;    -   (b) ensuring that the instrument is in link state U0 in        preparation for receiving a plurality of Isochronous Timestamp        Packets (ITP);    -   (c) the USB Host Controller sending a plurality of Isochronous        Timestamp Packets to the Isochronous communication pipes or        endpoints;    -   (d) the instrument receiving the plurality of Isochronous        Timestamp Packets and in response generating a respective        plurality of interrupts and passing the interrupts to the        microcontroller;    -   (e) a timer measuring a time interval between receptions of the        Isochronous Timestamp Packets in a time domain of the local        oscillator; and    -   (f) the instrument creating a mapping between respective local        times of a plurality of operations or events of the function        circuitry of the instrument and a time domain of the USB Host        Controller.

The instruments may be SuperSpeed USB devices.

In a third broad aspect, the invention provides a system for reducingtriggering latency and acquiring data across a plurality of differentinstrumentation interfaces, comprising:

-   -   a USB host controller; and    -   a plurality of USB devices in data communication with the USB        host controller, each of the USB devices having a synchronous        clock, a synchronized real time clock register and a memory;    -   wherein the USB devices are controllable to synchronously        commence acquiring data, to store to their respective memory the        data once acquired and to store to their respective memory time        stamp information indicative of the time of acquisition of at        least some of the acquired data; a first of the USB devices is        configured to respond to a data collection command to collect        data by sending to the USB host controller a first message that        includes data indicative of a time of receipt of the data        collection command, the USB host controller is configured to        respond to the first message by sending the other USB devices a        second message including the data indicative of the time of        receipt by the first USB device of the data collection command,        and the other USB devices are configured to respond to the        second message by reading their respective memories and sending        acquired data stored therein to the USB host controller        commencing from a location in each respective memory        corresponding to the time of receipt or a next available        location.

In a fourth broad aspect, the invention provides a USB system,comprising:

-   -   a plurality of USB networks, each comprising a USB host        controller and a plurality of synchronised USB devices, the        plurality of USB networks being synchronised such that the        plurality of USB devices across the plurality of USB networks        are mutually synchronised;    -   wherein the USB devices are configured (i) to execute a        plurality of instructions upon receipt of an external trigger        signal, the instructions comprising that the respective USB        device make a measurement of one or more parameters of the        respective USB device, (ii) to time stamp the respective        measurement, and (iii) record the measurement in a respective        local memory; and    -   wherein a first of the USB devices is configured to notify its        respective USB host controller upon receipt of the external        trigger signal, the respective USB host controller is configured        to respond to being notified of the receipt by notifying each of        the other USB devices connected to the respective USB host        controller and the one or more other of the USB host controllers        of the receipt of the external trigger signal and its associated        timestamp by the first USB device, the other of the USB host        controllers are configured to notify their respective USB        devices of the occurrence of the external trigger signal and its        associated timestamp, the plurality of USB devices on the other        of the USB networks are configured to transmit a content, if        any, of their respective local memories to their respective USB        host controller in response to receiving the notification of the        receipt, and the plurality of USB devices on the other of the        USB networks are configured to execute their respective        plurality of instructions in response to receiving notification        of the receipt.

In one embodiment, the USB devices are configured to continue executingtheir prescribed instructions while transmitting the contents of theirrespective local memories to their respective Host Controllers, tocontinue to buffer data to their respective local memories and to beginsteaming data directly to their respective Host Controllers once thecontents of their respective memories have been completely transferredto their respective Host Controllers.

In a fifth broad aspect, the invention provides a trigger engine ordevice, comprising:

-   -   a local clock synchronisable to the respective local clocks of a        plurality of USB devices attached to a common USB host        controller;    -   wherein the trigger device is configured to time stamp an        external trigger signal upon receipt thereof, and to notify the        USB host controller of the receipt and of the associated time        stamp.

In one embodiment, the trigger device is configured to execute a set ofinstructions and buffer time stamped results thereof in a local memory,and to transmit the buffered and time stamped results to the USB hostcontroller after receipt of the external trigger signal.

The device may be adapted to continue executing the set of instructionswhile transferring the results from the memory to the USB hostcontroller, including buffering data to the memory, and to begintransferring the data to the USB host controller after the results havebeen transferred to from the memory to the USB host controller.

According to this aspect, the invention also provides a USB device,comprising:

-   -   a local clock; and    -   a local memory;    -   wherein the local clock is synchronisable to respective local        clocks of one or more other USB devices, and the USB device is        configured to receive a set of instructions from a USB host        controller, to initiate the instructions and buffer results in        the local memory, and to respond to receiving notification of        the time that an external trigger signal was received by a        trigger device by transmitting the buffered results to the USB        host controller.

In one embodiment, the USB device is adapted to continue executing theinstructions while transmitting the results to the USB host controller,and to buffer data to the memory and to initiate transferring the datato the USB host controller after the results have been transferred tofrom the memory to the USB host controller.

In a sixth broad aspect, the invention provides a method of reducing thetriggering latency of a plurality of devices or instruments attached toa plurality of different instrumentation interfaces, the instrumentationinterfaces being in data communication with each other and connected byone or more synchronisation channels, the method comprising:

-   -   synchronising the instrumentation interfaces via the        synchronisation channels;    -   synchronising the devices or instruments to their respective        instrumentation interfaces;    -   configuring the devices or instruments so as to respond to a        trigger notification from one or more of the other trigger        devices or instruments by executing a plurality of instructions,        the instructions being adapted to instruct the devices or        instruments to one or more measurements of one or more        parameters of the respective devices or instruments;    -   arming the devices or instruments such that the devices or        instruments commence performing their prescribed functions        synchronously, receive and store to their respective memory data        acquired as a result of performing the prescribed functions and        store to their respective memory time stamp information        indicative of the time of acquisition of the acquired data;    -   one of the trigger devices or instruments responding to receipt        of a trigger event by transmitting or initiating transmission of        a trigger notification to the other devices or instruments        across the instrumentation interfaces;    -   the devices or instruments on the instrumentation interfaces        transmitting the content of their respective local memories to        their respective communication controllers in response to        receiving the trigger notification; and    -   the devices or instruments executing their respective plurality        of instructions in response to receiving the trigger        notification.

The instrumentation interfaces may comprise, for example, one or more ofPXI, PXI-express, IEEE-1588 ethernet, PCI, VXI or USB.

This aspect also provides an apparatus for transferring trigger signalsfrom a first USB device to a plurality of second USB Devices attached toa USB network with minimal latency, the apparatus comprising:

-   -   USB hub circuitry adapted to communicate upstream toward a Host        Controller and to communicate downstream toward a plurality of        USB devices; and    -   trigger engine circuitry adapted to observe communication        traffic upstream of the USB hub circuitry and to transmit        communication packets downstream to an upstream port of the USB        hub circuitry;    -   wherein the trigger engine is configured to decode upstream        directed communication from a USB network connected downstream        of the apparatus, to search for specific trigger request signals        transmitted upstream from the USB network, and to transmit        trigger command packets downstream toward the USB hub circuitry        upon reception of the trigger request signals.

In one embodiment, the trigger engine circuitry is located inlinebetween the upstream port and the USB Hub circuitry, and is configuredto transmit the communication traffic upstream of the USB hub circuitryand to transmit the communication packets passing downstream to theupstream port of the USB hub circuitry. In one embodiment, the apparatusis configured so that communication from upstream of the apparatus tothe USB Hub circuitry passes through the trigger engine.

The apparatus may further comprise multiplexer circuitry adapted toselectively route either an upstream signal path or output of thetrigger engine to the upstream port of the USB hub circuitry.

According to this aspect there is still further provided an apparatusfor transferring trigger signals from a first USB device to a pluralityof second USB Devices attached to a USB network with minimal latency,the apparatus comprising:

-   -   circuitry adapted for communicating upstream toward a USB Host        Controller and communicating downstream toward a plurality of        USB devices; and    -   trigger engine circuitry adapted to observe all communication        traffic through the apparatus;    -   wherein the apparatus is adapted to decode upstream directed        communication from the plurality of USB devices, to search for        specific trigger request signals transmitted upstream from the        USB network, and to transmit trigger command packets downstream        toward the plurality of USB devices upon reception of the        trigger request signals.

In one embodiment, the trigger engine circuitry is located inlineupstream of the circuitry, and is configured to transmit thecommunication traffic upstream of the circuitry. In one embodiment, theapparatus further comprises multiplexer circuitry adapted to selectivelydisable an upstream signal connection.

According to this aspect there is still further provided a method oftransferring trigger signals from a first USB device to one or moresecond USB devices attached to a USB network with minimal latency, themethod comprising:

-   -   arming the first USB device to receive a Trigger Condition;    -   the first USB device detecting the Trigger Condition;    -   the first USB Device responding by transmitting a Trigger        Request message upstream to a USB Host Controller of the USB        network;    -   detecting passage of the Trigger Request with a Trigger Engine        located in the USB network; and    -   the Trigger Engine responding to detection of the Trigger        Request by transmitting a Trigger Command message downstream to        the second USB devices.

In one embodiment, the method further comprises:

-   -   opening a communication pipe between a USB Host Controller and        the plurality of USB devices; and    -   inserting the Trigger Command into a data packet passing        downstream in the communication pipe.

In one embodiment, the method further comprises:

-   -   selectively disconnecting the plurality of USB devices upstream        of the Trigger Engine; and    -   transmitting the Trigger Command downstream of the Trigger        Engine.

The Trigger Condition may be reception of a signal from an externalsource.

The USB devices may be non-SuperSpeed Devices. The Trigger Engine maybroadcast the Trigger Command to all attached downstream USB devices.

The USB devices may be SuperSpeed USB Devices. The Trigger Engine mayselectively transmit the Trigger Command to the second USB devices, eachof the second USB devices being addressed using a USB Routing String.

In a certain embodiment, the method includes detecting passage of theTrigger Request passing through the Trigger Engine.

According to this aspect there is also provided a method of triggering aplurality of first USB devices to perform their respective predefinedoperations with a trigger signal applied at at least one second USBdevice with minimal latency, the first and second USB devices attachedto a common USB network, the method comprising:

-   -   arming the second USB device to receive a Trigger Condition;    -   the second USB Device detecting the Trigger Condition;    -   the second USB Device responding by transmitting a Trigger        Request message upstream to a USB Host Controller of the USB        network;    -   detecting passage of the Trigger Request with a Trigger Engine;        and    -   the Trigger Engine responding to detecting the passage of the        Trigger Request by transmitting a Trigger Command message        downstream to the plurality of first USB devices.

Thus, the plurality of second USB devices execute their respectivepredefined operations with minimal trigger propagation latency.

In one embodiment, the method further comprises:

-   -   opening a communication pipe between a USB Host Controller and        the plurality of USB devices; and    -   inserting the Trigger Command into a data packet passing        downstream in the communication pipe.

In an embodiment, the method further comprises:

-   -   selectively disconnecting the plurality of USB devices upstream        of the Trigger Engine; and    -   transmitting the Trigger Command downstream of the Trigger        Engine.

The Trigger Condition may be reception of a signal from an externalsource.

The USB devices may be non-SuperSpeed Devices. The Trigger Engine maybroadcast the Trigger Command to all attached downstream USB devices.

The USB devices may be SuperSpeed USB Devices. The Trigger Engine mayselectively transmit the Trigger Command to the second USB devices, thesecond USB devices being addressed using a USB Routing String.

In one embodiment, the method includes detecting passage of the TriggerRequest passing through the Trigger Engine.

In a seventh broad aspect, the invention provides a method of triggeringa plurality of USB devices to perform their respective predefinedoperations upon reception of a plurality of trigger signals, the USBdevices attached to a common USB network, comprising:

-   -   arming the USB devices to receive respective trigger conditions;    -   configuring a trigger engine attached to the USB network with a        specific combinatorial trigger state, the combinatorial trigger        state being a combination of trigger states of the USB devices,    -   the USB devices detecting the respective trigger conditions;    -   the USB devices transmitting respective trigger request messages        upstream to a USB Host Controller of the USB network, the        trigger request messages being indicative of respective trigger        states of the USB devices;    -   detecting passage of the trigger requests with the trigger        engine;    -   the trigger engine maintaining a record of a trigger status of        each of the USB devices;    -   the trigger engine comparing the record of trigger status with        the combinatorial trigger state;    -   the trigger engine transmitting a trigger command message        downstream to the USB devices upon the trigger status matching        the combinatorial trigger state.

Thus, the plurality of USB devices execute their respective predefinedoperations with minimal trigger propagation latency.

In one embodiment, the combinatorial trigger state includes timedependence, such that temporal relationships between transitions of therespective plurality of trigger states is important.

The method may further comprise:

-   -   opening a communication pipe between a USB Host Controller and        the plurality of USB devices; and    -   inserting the trigger command into a data packet passing        downstream in the communication pipe.

In one embodiment, the method further comprises:

-   -   selectively disconnecting the USB devices upstream of the        trigger engine; and    -   transmitting the trigger command downstream of the trigger        engine.

The Trigger Condition may be reception of a signal from an externalsource.

The USB devices are non-SuperSpeed Devices. The trigger engine maybroadcasts the trigger command to the USB devices.

The USB devices may be SuperSpeed USB Devices. The trigger engine mayselectively transmit the trigger command to the USB devices, each of theUSB devices being addressed using a USB Routing String.

In one embodiment, the method includes detecting passage of the triggerrequest passing through the trigger engine.

According to this aspect, there is also provided an apparatus fortriggering a plurality of USB devices attached to a common USB networkto perform respective predefined operations upon reception of respectivetrigger signals, the apparatus comprising:

-   -   circuitry adapted for communicating upstream toward a USB Host        Controller and communicating downstream toward the USB devices;    -   trigger engine circuitry adapted to observe communication        traffic through the apparatus;    -   circuitry adapted to compare a plurality of trigger request        signals with a predefined Combinatorial Trigger State; and    -   circuitry adapted to transmit communication packets downstream;    -   wherein the apparatus is adapted to decode upstream directed        communication from the USB devices, to search for specific        trigger request signals transmitted upstream from the USB        network, and to transmit trigger command packets downstream        toward the USB devices upon reception of the plurality of        trigger request signals in correct combinatorial relationship.

The combinatorial trigger state may includes time dependence.

The apparatus may be further adapted to:

-   -   open a communication pipe between a USB Host Controller and the        USB devices; and    -   insert the trigger command into a data packet passing downstream        in the communication pipe.

The apparatus may be further adapted to:

-   -   selective disconnecting the USB devices upstream of a trigger        device; and    -   transmit the trigger command downstream of the trigger engine.

The Trigger Condition may be reception of a signal from an externalsource.

The USB devices are non-SuperSpeed Devices. The trigger command may bebroadcast by a trigger engine to the USB devices.

The USB devices may be SuperSpeed USB Devices. The trigger command maybe selectively transmitted by a trigger engine to the USB devices, eachof the USB devices being addressed using a USB Routing String.

The apparatus may be configured to detect passage of the trigger requestpassing through the trigger engine.

It should be noted that all the various features of each of the aboveaspects of the invention can be combined as suitable and desired.

Furthermore, it should be noted that the invention also providesapparatuses and systems arranged to perform each of the methods of theinvention described above.

In addition, apparatuses according to the invention can be embodied invarious ways. For example, such devices could be constructed in the formof multiple components on a printed circuit or printed wiring board, ona ceramic substrate or at the semiconductor level, that is, as a singlesilicon (or other semiconductor material) chip.

BRIEF DESCRIPTION OF THE DRAWINGS

In order that the present invention may be more clearly ascertained,embodiments will now be described, by way of example, with reference tothe accompanying drawing, in which:

FIG. 1 is a schematic diagram of the dual-bus architecture of USB3according to the background art;

FIG. 2A is a schematic representation of an apparatus for reducing thetriggering latency of USB devices according to an embodiment of thepresent invention;

FIG. 2B is a schematic representation of an apparatus for reducing thetriggering latency of USB devices according to another embodiment of thepresent invention; and

FIG. 3 is a schematic representation of a USB network according toanother embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 2A is a schematic representation of an apparatus in the form of aTrigger Hub 100 according to an embodiment of the present invention, forreducing the triggering latency of USB devices. Trigger Hub 100 has anupstream port 102, a plurality of downstream ports 106, a USB Hub chip108 and a Trigger Controller or Engine 110 (connected to upstream port102 by upstream line 104).

Trigger Engine 110 is thus located between upstream port 102 and USB Hubchip 108 such that all upstream communication passes through it. In thisway Trigger Engine 110 is able to observe all communication traffic.

However, Trigger Engine 110 need not be located ‘inline’ betweenupstream port 102 and USB Hub chip 108: according to a variant of theembodiment of FIG. 2A, Trigger Engine 110 may be adapted to observetraffic without being inline. FIG. 2B is a schematic representation of aTrigger Hub 100′ according to this variant in which, as compared withTrigger Hub 100 of FIG. 2A, like reference numerals have been used toidentify like features. Trigger Hub 100′ thus includes an upstream port102, a plurality of downstream ports 106 and a USB Hub chip 108,situated as in Trigger Hub 100 of FIG. 2A. Trigger Engine 110′ ofTrigger Hub 100′, however, is arranged merely to observe traffic atmonitoring point 114 on upstream line 104, and has a separate downstreamconnection 116 to USB Hub chip 108. Trigger Hub 100′ optionally includesa multiplexer 118 to selectively connect either upstream line 104 orTrigger Engine 110′ to USB Hub chip 108.

FIG. 3 is a schematic representation of a USB network 120 according toanother embodiment of the present invention. USB network 120, though insome respects a typical and conventional USB network, includes a TriggerHub 100″ (comprising either Trigger Hub 100 of FIG. 2A or Trigger Hub100′ of FIG. 2B) to reduce the latency in triggering signals passingfrom one USB device to another. USB network 120 also contains a USB HostController 122, a plurality of USB Hubs 124 and a plurality of USBDevices 126, 128, 130.

In one scenario illustrating the operation of USB network 120 (and henceof Trigger Hub 100 or Trigger Hub 100′), USB device 126 wishes to send alow latency trigger to USB devices 128 and 130 (so is henceforthreferred to as the ‘trigger device’ 126′). When arming USB devices 128and 130 to receive a trigger signal, Host Controller 122 opens acommunication pipe downstream to each of devices 128 and 130. This willbe referred to as the ‘Trigger Pipe’ and may be an isochronous pipe inwhich a fixed bandwidth is made available during each USB frame or itmay be another form of data pipe.

Trigger device 126 is armed and waiting to receive a trigger (typicallyfrom an external device). Once the trigger has been received, triggerdevice responds by sending a message (or trigger request) is transmittedupstream, passing through Trigger Hub 100″ on its way to Host Controller122. Trigger Engine 110 decodes the upstream message and observes thattrigger device 126 has issued a trigger request.

Trigger Engine 110 then broadcasts a message, in the form of a TriggerCommand, on all downstream ports 106 of Trigger Hub 100″. In the case ofnon-SuperSpeed USB, the message passes down the entire network and isreceived by all attached devices. In the case of SuperSpeed USB, TriggerEngine 110 would need to transmit each message individually to aspecific network address, defined by the USB Routing String.

Each armed USB device 128, 130 receives the downstream trigger commandmessage and executes its own predefined commands. This approach obviatesthe need for triggers to pass through the operating system, the slowestpart of the chain.

Trigger Hub 100″ does not have the right to instigate packet transfersaccording to the USB Specification′ only Host Controller 122 has thatright. This is why the Trigger Pipe was opened by Host Controller 122 atthe beginning of the trigger arming process. In the case of anIsochronous pipe, a small bandwidth channel is opened between TriggerHub 100″ and each attached USB device 126, 128, 130. In the case ofnon-SuperSpeed devices, only one pipe is required since all packets arebroadcast downstream. Once Trigger Hub 100″ receives the trigger requestfrom trigger device 126, Trigger Hub 100″ waits for the next scheduleddownstream transmission time in the Trigger Pipe and inserts a triggercommand into the downstream packet. This Trigger Command is thenreceived by USB devices 128 and 130, which respond by executing theircommands.

In another embodiment, Trigger Engine 110 injects phantom packetsdownstream. Trigger Engine 110 either waits until it comes across a gapin the downstream packet that it can use to inject the phantom packet,or momentarily disconnects reception of signals from upstream port 102,allowing Trigger Engine 110 to transmit the downstream Trigger Command.

Furthermore, these techniques are applicable when combinatorial triggerlogic must be applied to a plurality of Trigger Requests. If oneconsiders the case where both USB Devices 126 and 128 are designatedTrigger Devices, USB Device 130 may be triggered to perform a functionwhen both USB device 126 and USB device 128 meet certain parameters.

According to this embodiment, therefore, Trigger Engine 110 containscombinatorial logic. Trigger Engine 110 is programmed by Host Controller122 with the required combination of triggers. Once Trigger Hub 100″receives valid trigger requests from both USB devices 126 and 128 itissues a Trigger Command to USB Device 130.

Furthermore, this combinatorial logic may include time windowing orother advanced multi-device triggering constraints: essentially anylevel of complexity of combinatorial logic may be accommodated accordingto this embodiment. Once all combinations of trigger requests have beenreceived and are valid, a trigger command may be issued by TriggerEngine 110.

Thus, these embodiments address the limitation imposed on the speed atwhich triggers can be transferred from one USB device to the nextarising from the Host-centric nature of conventional USB architecture,whereby all communication is initiated by a Host with no directinter-device communication (a limitation exacerbated by the fact thatcommunication must pass through the operating system, which can have theeffect of delaying trigger propagation by milliseconds, or even secondsin cases with a heavily loaded processor).

Modifications within the scope of the invention may be readily effectedby those skilled in the art. It is to be understood, therefore, thatthis invention is not limited to the particular embodiments described byway of example hereinabove and that combinations of the variousembodiments described herein are readily apparent to those skilled inthe art.

In the preceding description of the invention and in the claims thatfollow, except where the context requires otherwise owing to expresslanguage or necessary implication, the expression “Host Controller”embraces all forms of USB Host Controller, including standard USB Hostcontrollers, USB-on-the-go Host Controllers and wireless USB HostControllers.

In the preceding description of the invention and in the claims thatfollow, except where the context requires otherwise owing to expresslanguage or necessary implication, the word “comprise” or variationssuch as “comprises” or “comprising” is used in an inclusive sense, thatis, to specify the presence of the stated features but not to precludethe presence or addition of further features in various embodiments ofthe invention.

Further, any reference herein to background art is not intended to implythat such background art forms or formed a part of the common generalknowledge in any country.

1. An apparatus for transferring trigger signals from a first USB deviceto a plurality of second USB Devices attached to a USB network withminimal latency, the apparatus comprising: communication circuitryadapted for communicating upstream toward a USB Host Controller andcommunicating downstream toward a plurality of USB devices; and triggerengine circuitry adapted to observe communication traffic through saidapparatus; wherein said apparatus is adapted to decode upstream directedcommunication directed to the USB Host Controller from said plurality ofUSB devices, to search for specific trigger request signals transmittedupstream from said USB network, and to transmit trigger command packetsdownstream toward said plurality of USB devices upon reception of saidtrigger request signals, and wherein said trigger command packets areinitiated by the apparatus.
 2. An apparatus as claimed in claim 1,wherein said trigger engine circuitry is located inline upstream of saidcircuitry, and is configured to transmit said communication trafficupstream of said circuitry.
 3. An apparatus as claimed in claim 1,further comprising multiplexer circuitry adapted to selectively disablean upstream signal connection.
 4. An apparatus as claimed in claim 1,wherein the communication circuitry comprises USB hub circuitry; and thetrigger engine circuitry is adapted to observe communication trafficupstream of said USB hub circuitry and to transmit communication packetsdownstream to an upstream port of said USB hub circuitry; wherein saidtrigger engine is configured to decode upstream directed communicationfrom a USB network connected downstream of said apparatus, to search forspecific trigger request signals transmitted upstream from said USBnetwork, and to transmit trigger command packets downstream toward saidUSB hub circuitry upon reception of said trigger request signals.
 5. Anapparatus as claimed in claim 4, configured so that communication fromupstream of said apparatus to said USB Hub circuitry passes through saidtrigger engine circuitry.
 6. An apparatus as claimed in claim 5, furthercomprising multiplexer circuitry adapted to selectively route either anupstream signal path or output of said trigger engine circuitry to saidupstream port of said USB hub circuitry.
 7. An apparatus as claimed inclaim 1, further comprising: logic circuitry adapted to compare aplurality of trigger request signals with a predefined CombinatorialTrigger State; wherein said apparatus is adapted to decode upstreamdirected communication from said USB devices, to search for specifictrigger request signals transmitted upstream from said USB devices, andto transmit trigger command packets downstream toward said USB devicesupon reception of said plurality of trigger request signals in correctcombinatorial relationship.
 8. An apparatus as claimed in claim 7,wherein said combinatorial trigger state includes time dependence.
 9. Anapparatus as claimed in claim 7, further adapted to: open acommunication pipe between the a USB Host Controller and said USBdevices; and insert said trigger command into a data packet passingdownstream in said communication pipe.
 10. An apparatus as claimed inclaim 7, further adapted to: selectively disconnect said USB devicesupstream of a trigger device; and transmit said trigger commanddownstream of said trigger engine circuitry.
 11. An apparatus as claimedin claim 4, wherein said USB devices include non-SuperSpeed Devices andsaid trigger command is broadcast by the trigger engine circuitry tosaid non-SuperSpeed USB devices.
 12. An apparatus as claimed in claim 4,wherein said USB devices include SuperSpeed USB Devices and said triggercommand is selectively transmitted by a trigger engine circuitry to saidSuperSpeed USB devices, each of said SuperSpeed USB devices beingaddressed using a USB Routing String.
 13. A method of transferringtrigger signals from a first USB device to one or more second USBdevices attached to a USB network with minimal latency, the methodcomprising: arming said first USB device to receive a Trigger Condition;said first USB device detecting said Trigger Condition; said first USBDevice responding by transmitting a Trigger Request message upstream toa USB Host Controller of said USB network; detecting passage of saidTrigger Request directed to the USB Host Controller with a TriggerEngine located in said USB network; and said Trigger Engine respondingto detection of said Trigger Request by transmitting a Trigger Commandmessage downstream to said second USB devices, wherein said TriggerCommand message is initiated by the Trigger Engine.
 14. A method asclaimed in claim 13, further comprising: opening a communication pipebetween a USB Host Controller and said plurality of USB devices; andinserting said Trigger Command into a data packet passing downstream insaid communication pipe.
 15. A method as claimed in claim 13, furthercomprising: selectively disconnecting said plurality of USB devicesupstream of said Trigger Engine; and transmitting said Trigger Commanddownstream of said Trigger Engine.
 16. A method as claimed in claim 13,wherein said second USB devices include non-SuperSpeed Devices and saidTrigger Command message is broadcast by the Trigger Engine to saidnon-SuperSpeed Devices.
 17. A method as claimed in claim 13, whereinsaid second USB devices include SuperSpeed USB Devices, wherein saidTrigger Engine selectively transmits said Trigger Command to saidSuperSpeed USB devices, each of said SuperSpeed USB devices beingaddressed using a USB Routing String.
 18. A method as claimed in claim13, further comprising: arming a plurality of said USB devices toreceive respective trigger conditions; configuring the trigger enginewith a specific combinatorial trigger state, said combinatorial triggerstate being a combination of trigger states of said USB devices, saidUSB devices detecting said respective trigger conditions; said USBdevices transmitting respective trigger request messages upstream to theUSB Host Controller of said USB network, said trigger request messagesbeing indicative of respective trigger states of said USB devices;detecting passage of said trigger requests with said trigger engine;said trigger engine maintaining a record of a trigger status of each ofsaid USB devices; said trigger engine comparing said record of triggerstatus with said combinatorial trigger state; said trigger enginetransmitting a trigger command message downstream to said USB devicesupon said trigger status matching said combinatorial trigger state. 19.A method as claimed in claim 18, wherein said combinatorial triggerstate includes time dependence, such that temporal relationships betweentransitions of said respective plurality of trigger states is important.